<template>
  <div>
    <el-dialog
      :visible.sync="dialogVisible"
      :close-on-click-modal="false"
      title="查看条件"
      width="750px"
      @close="close"
    >
      <div v-if="row">
        <el-form label-width="120px" size="small">
          <el-form-item label="操作方式：">{{ typeOptions[row.conditionType] }}</el-form-item>
          <el-form-item label="筛选条件：">{{ row.condition }}</el-form-item>
        </el-form>
      </div>
      <div slot="footer" class="dialog-footer">
        <!-- <el-button size="small" round @click="hide">取 消</el-button> -->
        <el-button size="small" round type="primary" @click="hide">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      // 配置
      resolve: null,
      reject: null,
      typeOptions: {
        1: '按筛选条件选择会员',
        2: '按手机号筛选会员',
        3: '通过Excel筛选会员'
      },
      // 状态null
      dialogVisible: null,
      // 数据
      row: null
    }
  },
  methods: {
    /**
     * 弹框相关
     */
    open({ row }) {
      this.row = row
      this.show()
      return new Promise((resolve, reject) => {
        this.resolve = resolve
        this.reject = reject
      })
    },

    show() {
      this.dialogVisible = true
    },

    close() {
    },

    hide() {
      this.resolve = null
      this.reject = null
      this.dialogVisible = false
    },

    /**
     * 数据组
     */

    /**
     * 按钮组
     */
    // 确 定
    submit() {
    }

    /**
     * 状态组
     */

    /**
     * 方法组
     */
  }
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
</style>
